function results = average_c(syn_a)
trial_begin = 1:syn_a.LEN_TRIAL:syn_a.NUM_TRIAL*syn_a.LEN_TRIAL; 
trial_end = syn_a.LEN_TRIAL:syn_a.LEN_TRIAL:syn_a.NUM_TRIAL*syn_a.LEN_TRIAL; 
average_c = zeros(syn_a.LEN_TRIAL, syn_a.NUM_COMPONENT);
for i = 1:syn_a.NUM_TRIAL
    average_c = average_c + syn_a.C(trial_begin(i) : trial_end(i), :);
end

average_c = average_c / syn_a.NUM_TRIAL;

results = syn_a;
results.C_ave = average_c;

end